package com.ncloud.web;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSONObject;
import com.ncloud.crm.dubboservice.CustTrialService;
import org.springframework.web.bind.annotation.*;

/**
 * Created by shiqiang on 2017/6/13.
 */
@RestController
@RequestMapping("/outApi")
public class OpenNCloudOutController {
    @Reference
    private CustTrialService custTrialService;
    @PostMapping(value = "/crm/trial")
    public JSONObject saveTrialInfo(@RequestBody String info){
        JSONObject result = new JSONObject();
        result.put("code", "0000");
        result.put("message", "OK!");
        result.put("info", "");
        JSONObject json = JSONObject.parseObject(info);
        custTrialService.saveTrialInfo(json);
        return result;
    }
}
